We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df5fbfa + b28bbc4 commit 86af3f5Copy full SHA for 86af3f5
github_deploy/main.py
@@ -17,10 +17,14 @@ def list_commands(self, ctx):
17
def get_command(self, ctx, name):
18
ns = {}
19
fn = os.path.join(plugin_folder, name + '.py')
20
- with open(fn) as f:
21
- code = compile(f.read(), fn, 'exec')
22
- eval(code, ns, ns)
23
- return ns['main']
+
+ if os.path.exists(fn):
+ with open(fn) as f:
+ code = compile(f.read(), fn, 'exec')
24
+ eval(code, ns, ns)
25
+ return ns['main']
26
27
+ ctx.fail("Invalid Command: {name}".format(name=name))
28
29
30
main = GithubDeploy(
0 commit comments