diff options
Diffstat (limited to 'pygn2m')
-rwxr-xr-x | pygn2m | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -87,15 +87,15 @@ try: args = parse_cmdline() # check if n2m has some file prefercences set on commandline - if n2m.wlfile is None: - wl = os.environ['HOME'] + '/pyg.whitelist' + if args.wlfile is None: + wl = os.path.expanduser('~/pyg.whitelist') else: - wl = n2m.wlfile + wl = args.wlfile - if n2m.logfile is None: - log = os.environ['HOME'] + '/pyg.log' + if args.logfile is None: + log = os.path.expanduser('~/pyg.log') else: - log = n2m.logfile + log = args.logfile # print 'using %s %s\n' % (wl,log) @@ -103,17 +103,17 @@ try: # reads stdin and parses article separating head from body n2m.readfile() - n2m.parsearticle() +# n2m.parsearticle() """phase 2: check whitelist for user's permission """ # make a first check of From: address - owner = wl.checkfrom(n2m.nntpheads['From:']) + owner = wl.checkfrom(n2m.nntpheads['From']) if owner is None: if sys.stdin.isatty() == 1 or args.test: - print ('"%s" is not in whitelist!' % (n2m.nntpheads['From:'][:-1])) + print ('"%s" is not in whitelist!' % (n2m.nntpheads['From'][:-1])) else: wl.logmsg(n2m.nntpheads, wl.DENY) @@ -139,7 +139,7 @@ try: for line in n2m.headers: print(line[:-1]) - if args.owner is None: + if owner is None: sys.exit(1) """phase 4: |