Commits

David Warburton  committed aca6fb7

disable support for conflict detection in linux

  • Participants
  • Parent commits e9b324f

Comments (0)

Files changed (1)

 import urllib, base64, urllib2
 
 from datetime import tzinfo, timedelta, datetime
-from dateutil import parser
+
+try:
+    from dateutil import parser
+except Exception, e:
+    parser = False
 
 try:
     import ssl
         theme = [t for t in store.themes if t['id'] == self.theme_id][0]
         asset = [a for a in theme['assets'] if a['key'] == self.key][0]
         
-        mine = parser.parse(cache_data[self.relpath]['retrieved_at'])
-        theirs = parser.parse(asset['updated_at'])
-        if (theirs > mine):
-            #uhoh, we would clobber it
-            sublime.set_timeout(lambda:sublime.status_message('Upload aborted, server has more recent version.'),0)
-            return
+        if (parser):
+            mine = parser.parse(cache_data[self.relpath]['retrieved_at'])
+            theirs = parser.parse(asset['updated_at'])
+            if (theirs > mine):
+                #uhoh, we would clobber it
+                sublime.set_timeout(lambda:sublime.status_message('Upload aborted, server has more recent version.'),0)
+                return
 
         with open(self.filename, 'rb') as f:
             value = f.read()