Commit a4030dc9 authored by Kedar A.'s avatar Kedar A. 💻

Corrected syntax error in models.

parent 23374297
......@@ -107,4 +107,4 @@ def main():
if __name__ == '__main__':
main()
\ No newline at end of file
main()
......@@ -204,7 +204,7 @@ class Filehive(DjangoDocument):
file_blob.seek(0, os.SEEK_END)
file_size = file_blob.tell()
file_blob.seek(0)
except Exception, e:
except Exception as e:
print "Exception in calculating file_size: ", e
file_size = 0
......@@ -218,7 +218,7 @@ class Filehive(DjangoDocument):
else:
try:
image_dimension_tuple = get_image_dimensions(file_blob)
except Exception, e:
except Exception as e:
print "Exception in calculating file dimensions: ", e
pass
......@@ -306,7 +306,7 @@ class Filehive(DjangoDocument):
try:
img = Image.open(StringIO(files.read()))
except Exception, e:
except Exception as e:
print "Exception in opening file with PIL.Image.Open(): ", e
return None, None
......@@ -343,7 +343,7 @@ class Filehive(DjangoDocument):
return mid_size_img, img_size
except Exception, e:
except Exception as e:
print "Exception in converting image to mid size: ", e
return None
......
......@@ -216,7 +216,7 @@ class GSystem(Node):
try:
if md5_or_relurl:
file_blob = gfs.open(md5_or_relurl)
except Exception, e:
except Exception as e:
print "File '", md5_or_relurl, "' not found: ", e
return file_blob
......
......@@ -292,5 +292,5 @@ class HistoryManager():
print "\nDeleted RCS json version file : ", version_file_path
os.remove(json_file_path)
print "\nDeleted RCS json file : ", json_file_path
except Exception, e:
except Exception as e:
print "\nException occured while deleting RCS file for node '", node_obj._id.__str__(), "' : ", e
......@@ -134,7 +134,7 @@ class node_holder(DjangoDocument):
# try:
# active_loggedin_and_buddy_users_group = DjangoGroup.objects.get_or_create(name=django_active_users_group_name)[0]
# except Exception, e:
# except Exception as e:
# print e
# pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment