Skip to content

Commit 93cb5dd

Browse files
Thierry Chappuisfreezed
authored andcommitted
Used os.environ directly in revert()
1 parent 548c81a commit 93cb5dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tasks.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
CONFIG['outputdir'] = CONFIG['basedir'] / 'output'
1515
CONFIG['conffile'] = CONFIG['basedir'] / 'pelicanconf.py'
1616
CONFIG['publishconf'] = CONFIG['basedir'] / 'publishconf.py'
17+
1718
CONFIG['opts'] = '--fatal=warnings'
18-
CONFIG['github'] = os.getenv('GITHUB_TOKEN')
1919
CONFIG['port'] = 8000
2020

2121
@task
@@ -75,7 +75,8 @@ class AddressReuseTCPServer(RootedHTTPServer):
7575
server = AddressReuseTCPServer(
7676
CONFIG['outputdir'],
7777
('', CONFIG['port']),
78-
ComplexHTTPRequestHandler)
78+
ComplexHTTPRequestHandler
79+
)
7980

8081
sys.stderr.write('Serving on port {port} ...\n'.format(**CONFIG))
8182
server.serve_forever()
@@ -109,9 +110,9 @@ def revert(c):
109110
)
110111
c.run('git checkout -b errors')
111112
c.run(
112-
'git push -f https://{github}@github.com/'
113+
'git push -f https://{GITHUB_TOKEN}@github.com/'
113114
'PythonClassmates/PythonClassmates.org.git errors:master'
114-
.format(**CONFIG)
115+
.format(**os.environ)
115116
)
116117
c.run('echo "Last commit reverted"')
117118
else:

0 commit comments

Comments
 (0)