summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-02-06 16:56:28 +0100
committerFlorian Pritz <bluewind@xinu.at>2019-02-06 16:56:28 +0100
commitdf16f2b307c5940b03336aa27f051e2bd4601f5c (patch)
treee7cc4adafbfc3ea07c4737f14369930574e3065a
parent30270a259c35d84fcedfe7ee1a1aefad655c7fa3 (diff)
Use constant for default stdin filename
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xfb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/fb.py b/fb.py
index 101959a..d38f580 100755
--- a/fb.py
+++ b/fb.py
@@ -413,6 +413,7 @@ class ConfigParser:
return self.config
class FBClient:
+ DEFAULT_NAME = 'stdin'
version = "@VERSION@"
if version.startswith('@'):
version = 'unknown-version'
@@ -485,7 +486,7 @@ class FBClient:
help="Upload a tar file containing all files (and directories)")
upload_options.add_argument("-m", "--multipaste", default=False, action="store_true",
help="create a multipaste")
- upload_options.add_argument("-n", "--name", default="stdin", action="store",
+ upload_options.add_argument("-n", "--name", default=FBClient.DEFAULT_NAME, action="store",
help="File name to use for upload when reading from stdin (default: stdin)")
upload_options.add_argument("-e", "--extension", default="", action="store",
help="extension for default highlighting (e.g. \"diff\")")