Not all datatype splitters write a JSON file

This commit is contained in:
Peter Cock
2012-02-16 16:22:58 +00:00
parent 0b3c0aabed
commit 3b3d70ce54
+3
View File
@@ -31,6 +31,9 @@ def __main__():
Argument: a JSON file
"""
file_path = sys.argv.pop( 1 )
if not os.path.isfile(file_path):
#Nothing to do - some splitters don't write a JSON file
sys.exit(0)
data = simplejson.load(open(file_path, 'r'))
try:
class_name_parts = data['class_name'].split('.')