Browse Source

[1404] don't do anything if the DB doesn't exist

JINMEI Tatuya 13 years ago
parent
commit
1bb5168b70
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compatcheck/sqlite3-difftbl-check.py.in

+ 5 - 0
compatcheck/sqlite3-difftbl-check.py.in

@@ -28,6 +28,11 @@ if len(args) == 0:
     parser.error('missing argument')
     parser.error('missing argument')
 
 
 db_file = args[0]
 db_file = args[0]
+
+# If the file doesn't exist, there's nothing to do
+if not os.path.exists(db_file):
+    sys.exit(0)
+
 conn = sqlite3.connect(db_file)
 conn = sqlite3.connect(db_file)
 cur = conn.cursor()
 cur = conn.cursor()
 try:
 try: