Skip to content

Commit a06991d

Browse files
committed
entrypoint needs to run on py35
1 parent ebf640c commit a06991d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

repo2docker/buildpacks/repo2docker-entrypoint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# note: must run on Python >= 3.5
23

34
# goals:
45
# - load environment variables from a login shell (bash -l)
@@ -35,7 +36,7 @@ def get_login_env():
3536
try:
3637
return json.loads(last_line)
3738
except Exception as e:
38-
print(f"Error getting login env: {e}", file=sys.stderr)
39+
print("Error getting login env: {e}".format(e=e), file=sys.stderr)
3940
return {}
4041

4142

@@ -113,7 +114,11 @@ def main():
113114

114115
def relay_signal(sig, frame):
115116
"""Relay a signal to children"""
116-
print(f"Forwarding signal {sig} to {child_pgid}")
117+
print(
118+
"Forwarding signal {sig} to {child_pgid}".format(
119+
sig=sig, child_pgid=child_pgid
120+
)
121+
)
117122
os.killpg(child_pgid, sig)
118123

119124
# question: maybe use all valid_signals() except a few, e.g. SIGCHLD?

0 commit comments

Comments
 (0)