Permalink
Browse files

Tweak so we don't crash if Numb= is empty

  • Loading branch information...
1 parent 7e3dfdd commit ed65ee940c8a511e5a818d4e1cfcbed03190429d @jgoerzen committed Aug 8, 2008
Showing with 4 additions and 1 deletion.
  1. +4 −1 pygopherd/handlers/UMN.py
@@ -224,7 +224,10 @@ def getLinkItem(self, fd, capfilepath = None):
entry.setport(int(line[5:]))
done['port'] = 1
elif line[0:5] == 'Numb=':
- entry.setnum(int(line[5:]))
+ try: # Don't crash if we can't parse the number
+ entry.setnum(int(line[5:]))
+ except:
+ pass
elif line[0:9] == 'Abstract=':
abstractstr = ""
abstractline = line[9:]

0 comments on commit ed65ee9

Please sign in to comment.