Morpheus / Mbed OS mbed-Client-Morpheus-hg

Dependencies:   mbed-os

Revision:
38:0ca5eea23af9
Parent:
37:bf73ffd98cca
Child:
39:8d6f31570710
--- a/neo.py	Wed Mar 30 13:12:06 2016 -0500
+++ b/neo.py	Wed Mar 30 13:58:36 2016 -0500
@@ -192,14 +192,15 @@
             return Repo.fromurl(f.read()).repo
 
     def write(self):
-        print repo.name, '->', repo.url
+        print self.name, '->', self.url
 
-        with open(repo.lib) as f:
-            if f.read().strip() == repo.url.strip():
-                return
+        if os.path.isfile(self.lib):
+            with open(self.lib) as f:
+                if f.read().strip() == self.url.strip():
+                    return
 
-        with open(repo.lib, 'w') as f:
-            f.write(repo.url + '\n')
+        with open(self.lib, 'w') as f:
+            f.write(self.url + '\n')
 
 # Clone command
 @subcommand('import', 'url', 'name?',