Skip to content

Commit

Permalink
Verify Python v3+ when running script
Browse files Browse the repository at this point in the history
  • Loading branch information
netromdk authored and 0verbyte committed Feb 10, 2018
1 parent 9343637 commit 9f8ba83
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slacker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env python

# Make sure v3+ is used.
import sys
vinfo = sys.version_info
if vinfo.major < 3:
print('You are using Python v{}.{}. v3+ is required!'.format(vinfo.major, vinfo.minor))
sys.exit(-1)

from slacker.main import start_slacker

if __name__ == '__main__':
Expand Down

0 comments on commit 9f8ba83

Please sign in to comment.