# HG changeset patch # User Mads Kiilerich # Date 1433882800 -7200 # Node ID 65872885d876de95f34761a0c4929e894b87265c # Parent d7f13c2a28bacccdab00745a8dccf39fa4c40e31# Parent a73f98871e2bc90ad42038c843a9b300263b4beb Merge stable diff -r d7f13c2a28ba -r 65872885d876 CONTRIBUTORS --- a/CONTRIBUTORS Mon Jun 01 17:40:31 2015 +0200 +++ b/CONTRIBUTORS Tue Jun 09 22:46:40 2015 +0200 @@ -74,3 +74,7 @@ Thomas De Schampheleire Tuux Zoltan Gyarmati + Kevin Bullock + Marc Villetard + Matthias Zilk + Tim Freund diff -r d7f13c2a28ba -r 65872885d876 kallithea/controllers/files.py --- a/kallithea/controllers/files.py Mon Jun 01 17:40:31 2015 +0200 +++ b/kallithea/controllers/files.py Tue Jun 09 22:46:40 2015 +0200 @@ -556,7 +556,7 @@ cached_archive_path = os.path.join(CONFIG['archive_cache_dir'], archive_name) if os.path.isfile(cached_archive_path): log.debug('Found cached archive in %s' % cached_archive_path) - fd, archive = None, cached_archive_path + archive = cached_archive_path use_cached_archive = True else: log.debug('Archive %s is not yet cached' % (archive_name)) @@ -564,6 +564,7 @@ if not use_cached_archive: # generate new archive fd, archive = tempfile.mkstemp() + os.close(fd) temp_stream = open(archive, 'wb') log.debug('Creating new temp archive in %s' % archive) cs.fill_archive(stream=temp_stream, kind=fileformat, subrepos=subrepos) @@ -580,8 +581,6 @@ data = stream.read(16 * 1024) if not data: stream.close() - if fd: # fd means we used temporary file - os.close(fd) if not archive_cache_enabled: log.debug('Destroying temp archive %s' % archive) os.remove(archive) diff -r d7f13c2a28ba -r 65872885d876 kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py Mon Jun 01 17:40:31 2015 +0200 +++ b/kallithea/lib/helpers.py Tue Jun 09 22:46:40 2015 +0200 @@ -479,7 +479,7 @@ def user_or_none(author): email = author_email(author) - if email is not None: + if email: user = User.get_by_email(email, case_insensitive=True, cache=True) if user is not None: return user diff -r d7f13c2a28ba -r 65872885d876 kallithea/model/forms.py --- a/kallithea/model/forms.py Mon Jun 01 17:40:31 2015 +0200 +++ b/kallithea/model/forms.py Tue Jun 09 22:46:40 2015 +0200 @@ -202,7 +202,7 @@ class _PasswordResetForm(formencode.Schema): allow_extra_fields = True filter_extra_fields = True - email = All(v.ValidSystemEmail(), v.Email(not_empty=True)) + email = v.Email(not_empty=True) return _PasswordResetForm