summaryrefslogtreecommitdiff
path: root/script/moveto3.py
diff options
context:
space:
mode:
Diffstat (limited to 'script/moveto3.py')
-rwxr-xr-xscript/moveto3.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/script/moveto3.py b/script/moveto3.py
index fba5ddd..408ff1a 100755
--- a/script/moveto3.py
+++ b/script/moveto3.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import argparse
import os
-import sys
def main():
@@ -9,12 +8,12 @@ def main():
ap.add_argument("-a", default="qmail-authuser", dest="pam")
ap.add_argument("fd", type=int)
ap.add_argument("prog")
- ap.add_argument("args", nargs='*')
+ ap.add_argument("args", nargs="*")
vals = ap.parse_args()
if vals.fd < 3:
- raise ValueError(f"fd({fd}) must be 3 or greater")
+ raise ValueError(f"fd({vals.fd}) must be 3 or greater")
if vals.fd != 3:
os.dup2(vals.fd, 3)
@@ -25,5 +24,5 @@ def main():
raise ValueError("should not be reachable")
-if __name__ == '__main__':
+if __name__ == "__main__":
main()