File tree 1 file changed +14
-22
lines changed
1 file changed +14
-22
lines changed Original file line number Diff line number Diff line change 30
30
31
31
32
32
33
-
34
-
33
+ from sys import exit
35
34
36
35
# VERIFY DEPENDENCIES
37
-
38
- def check_pyleapcard_installed ():
39
- try :
40
- import pyleapcard
41
- except ImportError :
42
- print ("Leap Card" )
43
- print ("---" )
44
- print ("Looks like the package 'pyleapcard' isn't installed." )
45
- print ("You need it to run this tool. To install, click 'Install Now'," )
46
- print ("then click 'Preferences' -> 'Refresh All...'" )
47
- print ("Install Now. | bash='sudo /usr/local/bin/pip install pyleapcard'" )
48
- exit ()
49
-
50
- check_pyleapcard_installed ()
51
-
52
-
53
-
36
+ try :
37
+ from pyleapcard import LeapSession
38
+ except ImportError :
39
+ print ("Leap Card" )
40
+ print ("---" )
41
+ print ("Looks like the package 'pyleapcard' isn't installed." )
42
+ print ("You need it to run this tool. To install, click 'Install Now'," )
43
+ print ("then click 'Preferences' -> 'Refresh All...'" )
44
+ print ("Install Now. | bash='sudo /usr/local/bin/pip install pyleapcard'" )
45
+ exit ()
54
46
55
47
56
48
@@ -59,7 +51,7 @@ def check_pyleapcard_installed():
59
51
import pickle
60
52
import os
61
53
import subprocess
62
- from pyleapcard import *
54
+ import sys
63
55
64
56
class StateMgmt :
65
57
@@ -160,8 +152,8 @@ def run():
160
152
161
153
try :
162
154
login_ok = session .try_login (leap_user , leap_pass )
163
- except Exception , e :
164
- login_error = e = sys .exc_info ()[0 ]
155
+ except Exception :
156
+ login_error = sys .exc_info ()[0 ]
165
157
166
158
state = StateMgmt ()
167
159
formatter = ResultsFormatter ()
You can’t perform that action at this time.
0 commit comments