chiark / gitweb /
Add py prefix to OpenGL and serial. Exit when error.
authorMiro Hrončok <miro@hroncok.cz>
Mon, 21 Jan 2013 14:26:45 +0000 (15:26 +0100)
committerMiro Hrončok <miro@hroncok.cz>
Mon, 21 Jan 2013 14:26:45 +0000 (15:26 +0100)
scripts/linux/cura.py

index e634076229aeed54ce5de1e46e3bb83a05ce2282..c055fdebf48c0a190e6d2f213978757a24035a02 100755 (executable)
@@ -10,12 +10,20 @@ try:
     import power
 except ImportError as e:
     module = e.message.lstrip('No module named ')
+    
+    if module == 'OpenGL':
+        module = 'PyOpenGL'
+    elif module == 'serial':
+        module = 'pyserial'
+    
     print 'Requires ' + module
 
     if module == 'power':
         print "Install from: https://github.com/GreatFruitOmsk/Power"
     else:
         print "Try sudo easy_install " + module
+    
+    exit(1)
 
 sys.path.insert(1, os.path.dirname(__file__))