summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-08-13 23:00:08 +0200
committerNico von Geyso <Nico.Geyso@FU-Berlin.de>2012-08-13 23:00:08 +0200
commit9d57963553da066a015133cc6e5fe56300c560f5 (patch)
treece87fd732331870f5de914e05fc29fda4881ec5b
parente6b974919f34857f9b550d2160e6d018beb9fa1b (diff)
downloadklausuren-9d57963553da066a015133cc6e5fe56300c560f5.tar.gz
klausuren-9d57963553da066a015133cc6e5fe56300c560f5.tar.bz2
klausuren-9d57963553da066a015133cc6e5fe56300c560f5.zip
create git repository if there is no one
-rw-r--r--app.py2
-rw-r--r--fit.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/app.py b/app.py
index 1c9b0d6..b8c4a59 100644
--- a/app.py
+++ b/app.py
@@ -54,8 +54,6 @@ class UploadForm(Form):
def validate_module(form, field):
modules = dict(app.config['MODULES'][form.study.data])
data = form.module.data
- print(data)
- print(modules)
if data not in modules or data == '':
raise ValidationError(u'Bitte wähle ein Modul!')
diff --git a/fit.py b/fit.py
index 4754b60..ce4d902 100644
--- a/fit.py
+++ b/fit.py
@@ -1,13 +1,13 @@
import os, time
import collections
-from pygit2 import Repository, Signature
+from pygit2 import init_repository, Signature
from binascii import b2a_hex
class Fit:
def __init__(self, path):
- self.repo = Repository(path)
+ self.repo = init_repository(path, True)
def _insert_node(self, node_oid, path, root_oid):
""" Inserts a new Node in a Git Tree graph """