Commits

David Gero  committed 8d5865d Draft

[m] handle importError

  • Participants
  • Parent commits 20d02f3

Comments (0)

Files changed (1)

File jozsefattilafrommek.py

 # -*- coding: utf8 -*-
-from urllib2 import urlopen
-from BeautifulSoup import BeautifulSoup
-from lxml import etree
-import re
-import nltk
+try:
+        from urllib2 import urlopen
+        from BeautifulSoup import BeautifulSoup
+        from lxml import etree
+        import re
+        import nltk
+        import ablakuveg
+except ImportError, err:
+        print("We don't found '{}' module in your computer. Please check your PATH.".format(err))
 
 class Tisztitas(object):