aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2012-02-29 21:52:19 +0000
committerRob Austein <sra@hactrn.net>2012-02-29 21:52:19 +0000
commit3ba401cb2df54893cb33a1627cbc7bff09ede6d8 (patch)
tree8013b887f2b9ec4aabe6de03267dbffe2bed783a
parentcc0bb8bebff23d50893c56d195d5414670478592 (diff)
Checkpoint
svn path=/trunk/; revision=4378
-rw-r--r--rcynic/rpki-torrent.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rcynic/rpki-torrent.py b/rcynic/rpki-torrent.py
index dd386c02..b5a329df 100644
--- a/rcynic/rpki-torrent.py
+++ b/rcynic/rpki-torrent.py
@@ -68,7 +68,10 @@ class TorrentNameDoesNotMatchURL(Exception):
def main():
try:
- syslog.openlog("rpki-torrent", syslog.LOG_PID | syslog.LOG_PERROR)
+ syslog_flags = syslog.LOG_PID;
+ if os.isatty(sys.stderr.fileno()):
+ syslog_flags |= syslog.LOG_PERROR
+ syslog.openlog("rpki-torrent", syslog_flags)
global cfg
cfg = MyConfigParser()
cfg.read([os.path.join(dn, fn)