You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print('The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet to use this functionality.\n')
104
-
exit(1)
102
+
raiseSystemExit('The global faucet cannot be used with a custom Signet network. Please use the global signet or setup your custom faucet to use this functionality.\n')
105
103
else:
106
104
# For custom faucets, don't request captcha by default.
print('The binary', args.imagemagick, 'could not be found. Please make sure ImageMagick (or a compatible fork) is installed and that the correct path is specified.')
132
-
exit(1)
134
+
raiseSystemExit(f"The binary{args.imagemagick}could not be found. Please make sure ImageMagick (or a compatible fork) is installed and that the correct path is specified.")
135
+
133
136
img=PPMImage(io.BytesIO(rv.stdout))
134
137
135
138
# Terminal interaction
136
139
print_image(img)
137
-
print('Enter captcha: ', end='')
138
-
data['captcha'] =input()
140
+
print(f"Captcha from URL {args.captcha}")
141
+
data['captcha'] =input('Enter captcha: ')
139
142
140
143
try:
141
144
res=session.post(args.faucet, data=data)
142
145
except:
143
-
print('Unexpected error when contacting faucet:', sys.exc_info()[0])
144
-
exit(1)
146
+
raiseSystemExit(f"Unexpected error when contacting faucet: {sys.exc_info()[0]}")
145
147
146
148
# Display the output as per the returned status code
0 commit comments