Permalink
Browse files

Python 3 fix for Bio.Restriction update script.

Nowhere else in Biopython uses FancyURLopener so it isn't
currently defined in Bio._py3k (but could be added there).
  • Loading branch information...
1 parent 45686a0 commit 8be2402b8424722121d14c286b62bf70e8befde9 @peterjc peterjc committed Dec 4, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 Bio/Restriction/_Update/Update.py
@@ -17,7 +17,11 @@
import sys
import time
-from Bio._py3k.urllib.request import FancyURLopener
+try:
+ from urllib import FancyURLopener
+except ImportError:
+ #Python 3
+ from urllib.request import FancyURLopener
from Bio.Restriction.RanaConfig import *

0 comments on commit 8be2402

Please sign in to comment.