diff options
author | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2012-08-13 23:00:08 +0200 |
---|---|---|
committer | Nico von Geyso <Nico.Geyso@FU-Berlin.de> | 2012-08-13 23:00:08 +0200 |
commit | 9d57963553da066a015133cc6e5fe56300c560f5 (patch) | |
tree | ce87fd732331870f5de914e05fc29fda4881ec5b | |
parent | e6b974919f34857f9b550d2160e6d018beb9fa1b (diff) | |
download | klausuren-9d57963553da066a015133cc6e5fe56300c560f5.tar.gz klausuren-9d57963553da066a015133cc6e5fe56300c560f5.tar.bz2 klausuren-9d57963553da066a015133cc6e5fe56300c560f5.zip |
create git repository if there is no one
-rw-r--r-- | app.py | 2 | ||||
-rw-r--r-- | fit.py | 4 |
2 files changed, 2 insertions, 4 deletions
@@ -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!') @@ -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 """ |