diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2020-02-19 07:14:09 +0100 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2020-02-19 07:14:09 +0100 |
commit | 6da1bebed307cb189b2525b8286eb35d43005f2b (patch) | |
tree | 38063b3d01d2b4e6f99a530b47d652b340c43901 | |
parent | 0b9db375bd7dd15ae43cc9fecca9565c52daaa72 (diff) | |
download | fetchmail-6da1bebed307cb189b2525b8286eb35d43005f2b.tar.gz fetchmail-6da1bebed307cb189b2525b8286eb35d43005f2b.tar.bz2 fetchmail-6da1bebed307cb189b2525b8286eb35d43005f2b.zip |
fetchmailconf.py: permit -V and -h while not under X11.
This helps packagers to run self-tests in headless build jails/chroots/...
for instance when making sure that all requisites are present.
-rwxr-xr-x | fetchmailconf.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fetchmailconf.py b/fetchmailconf.py index 07596b17..c6073660 100755 --- a/fetchmailconf.py +++ b/fetchmailconf.py @@ -29,7 +29,7 @@ import subprocess from tkinter import * from tkinter.dialog import * -VERSION = "1.63" +VERSION = "1.63.1" MIN_PY = (2, 7, 13) if sys.version_info < MIN_PY: @@ -2132,10 +2132,6 @@ def copy_instance(toclass, fromdict): if __name__ == '__main__': - if "DISPLAY" not in os.environ: - print("fetchmailconf must be run under X") - sys.exit(1) - fetchmail_icon = """ R0lGODdhPAAoAPcAAP///wgICBAQEISEhIyMjJSUlKWlpa2trbW1tcbGxs7Ozufn5+/v7//39yEY GNa9tUoxKZyEe1o5KTEQAN7OxpyMhIRjUvfn3pxSKYQ5EO/Wxv/WvWtSQrVzSmtCKWspAMatnP/e @@ -2203,6 +2199,10 @@ welcome to redistribute it under certain conditions. Please see the file COPYING in the source or documentation directory for details.""") sys.exit(0) + if "DISPLAY" not in os.environ: + print("fetchmailconf must be run under X") + sys.exit(1) + # Get client host's FQDN hostname = socket.gethostname() if not '.' in hostname: |