浏览代码

Wording and punctuation

pull/93/head
flo269 GitHub 8 年前
父节点
当前提交
59b15ed5ba
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      modules/recipe_import/kbh.py

+ 4
- 4
modules/recipe_import/kbh.py 查看文件

@@ -17,7 +17,7 @@ class KBH(FlaskView):
conn = None conn = None
try: try:
if not os.path.exists(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db'): if not os.path.exists(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db'):
self.api.notify(headline="File Not Found", message="Please upload a Kleiner Brauhelfer Database", type="danger")
self.api.notify(headline="File Not Found", message="Please upload a Kleiner Brauhelfer database.", type="danger")
return ('', 404) return ('', 404)


conn = sqlite3.connect(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db') conn = sqlite3.connect(self.api.app.config['UPLOAD_FOLDER'] + '/kbh.db')
@@ -30,7 +30,7 @@ class KBH(FlaskView):
return json.dumps(result) return json.dumps(result)
except Exception as e: except Exception as e:
print e print e
self.api.notify(headline="Failed to load KHB database", message="ERROR", type="danger")
self.api.notify(headline="Failed to load KHB database.", message="ERROR", type="danger")
return ('', 500) return ('', 500)
finally: finally:
if conn: if conn:
@@ -47,11 +47,11 @@ class KBH(FlaskView):
if file and self.allowed_file(file.filename): if file and self.allowed_file(file.filename):
filename = secure_filename(file.filename) filename = secure_filename(file.filename)
file.save(os.path.join(self.api.app.config['UPLOAD_FOLDER'], "kbh.db")) file.save(os.path.join(self.api.app.config['UPLOAD_FOLDER'], "kbh.db"))
self.api.notify(headline="Upload Successful", message="The Kleiner Brauhelfer Database was uploaded succesfully")
self.api.notify(headline="Upload Successful", message="The Kleiner Brauhelfer database was succesfully uploaded.")
return ('', 204) return ('', 204)
return ('', 404) return ('', 404)
except Exception as e: except Exception as e:
self.api.notify(headline="Upload Failed", message="Failed to upload Kleiner Brauhelfer", type="danger")
self.api.notify(headline="Upload Failed", message="Failed to upload Kleiner Brauhelfer database.", type="danger")


return ('', 500) return ('', 500)




正在加载...
取消
保存