Преглед изворни кода

Remove try ... Except around colorama import

It is expected to be installed by setuptools
oz123 пре 10 година
родитељ
комит
47027c6e9c
1 измењених фајлова са 10 додато и 13 уклоњено
  1. 10 13
      pwman/__init__.py

+ 10 - 13
pwman/__init__.py

@@ -26,6 +26,7 @@ import sys
 import re
 import re
 import data.factory
 import data.factory
 from pwman.data.database import __DB_FORMAT__
 from pwman.data.database import __DB_FORMAT__
+import colorama
 
 
 appname = "pwman3"
 appname = "pwman3"
 
 
@@ -40,19 +41,19 @@ author = "Oz Nahum"
 authoremail = "nahumoz@gmail.com"
 authoremail = "nahumoz@gmail.com"
 description = "a command line password management application."
 description = "a command line password management application."
 keywords = "password management sqlite crypto"
 keywords = "password management sqlite crypto"
-long_description = ("Pwman3 aims to provide a simple but powerful command line "
-                    "interface for password management.\nIt allows one to store your "
-                    "password in a SQLite database locked by a\nmaster password which "
-                    "can be encrypted with different algorithms (e.g AES, Blowfish, "
-                    "DES3, IDEA, etc.).")
+long_description = ("Pwman3 aims to provide a simple but powerful command "
+                    "line interface for password management.\nIt allows one "
+                    "to store your password in a SQLite database locked by "
+                    "a\nmaster password which can be encrypted with different "
+                    "algorithms (e.g AES, Blowfish, DES3, IDEA, etc.).")
 
 
 _db_warn = ("pwman3 detected that you are using the old database format"
 _db_warn = ("pwman3 detected that you are using the old database format"
             " which is insecure."
             " which is insecure."
             " pwman3 will try to automatically convert the database now."
             " pwman3 will try to automatically convert the database now."
             "\n"
             "\n"
             "If you choose not to convert the database, pwman3, will quit."
             "If you choose not to convert the database, pwman3, will quit."
-            "\nYou can check the help (pwman3 -h) or look at the manpage how to convert "
-            " the database manually."
+            "\nYou can check the help (pwman3 -h) or look at the manpage how "
+            "to convert the database manually."
             )
             )
 
 
 
 
@@ -127,13 +128,9 @@ def set_xsel(config, OSX):
         config.set_value("Global", "xsel", pbcopypath)
         config.set_value("Global", "xsel", pbcopypath)
 
 
 
 
-def set_win_colors(config):
+def set_win_colors(config):  # pragma: no cover
     if 'win' in sys.platform:
     if 'win' in sys.platform:
-        try:
-            import colorama
-            colorama.init()
-        except ImportError:
-            config.set_value("Global", "colors", 'no')
+        colorama.init()
 
 
 
 
 def set_umask(config):
 def set_umask(config):