comparison bin/edit @ 11241:c54ea57faa7a

<shachaf> revert
author HackBot
date Wed, 08 Nov 2017 23:19:46 +0000
parents 634fd0064603
children 04a136d6150e
comparison
equal deleted inserted replaced
11240:634fd0064603 11241:c54ea57faa7a
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 import sys, os.path, re, urllib 3 import sys, os.path, re, urllib
4 4
5 if len(sys.argv) < 2: 5 if len(sys.argv) < 2:
6 sys.exit('httpss://hackego.esolangs.org/edit/') 6 sys.exit('https://hackego.esolangs.org/edit/')
7 7
8 f = os.path.realpath(sys.argv[1]) 8 f = os.path.realpath(sys.argv[1])
9 f = re.sub(r"^/+hackenv/", "", f) 9 f = re.sub(r"^/+hackenv/", "", f)
10 if re.match(r"/|\.hg(?:/|ignore$|$)",f): 10 if re.match(r"/|\.hg(?:/|ignore$|$)",f):
11 sys.exit("File is not editable.") 11 sys.exit("File is not editable.")
12 print 'httpss://hackego.esolangs.org/edit/' + urllib.quote(f) 12 print 'https://hackego.esolangs.org/edit/' + urllib.quote(f)