Sfoglia il codice sorgente

added default exit msg

epsylon 5 anni fa
parent
commit
4ef33f1a60
1 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  1. 7 4
      core/main.py

+ 7 - 4
core/main.py

@@ -212,11 +212,14 @@ class UFONet(object):
         print('='*75)
 
     def generate_exit_msg(self):
-        f = open(self.misc_file)
-        m = f.readlines()
-        f.close()
         self.exit_msg = "Generating random exit... \n\n"
-        self.exit_msg += " -> "+str(random.choice(m).strip()) 
+        try:
+            f = open(self.misc_file)
+            m = f.readlines()
+            f.close()
+            self.exit_msg += " -> "+str(random.choice(m).strip())
+        except:
+            self.exit_msg += " -> Donate BTC (Bitcoin) to keep #UFONet (https://ufonet.03c8.net) strong!" 
 
     def AI(self):
         try: