Skip to content

Commit

Permalink
Merge pull request #1207 from tripleee/revert-git-lockdir
Browse files Browse the repository at this point in the history
Revert "Guard against gitmanager clashes with a lock dir"
  • Loading branch information
tripleee committed Nov 8, 2017
2 parents 4883853 + 47ad694 commit ba77445
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions gitmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
from datetime import datetime
from threading import Lock
from os import mkdir, rmdir

import regex
import requests
Expand Down Expand Up @@ -35,12 +34,6 @@ def add_to_blacklist(cls, **kwargs):
chat_profile_link = kwargs.get("chat_profile_link", "http://chat.stackexchange.com/users")
code_permissions = kwargs.get("code_permissions", False)

# Block if git lock directory exists
try:
mkdir('gitmanager.lock')
except FileExistsError:
return (False, "Previous operation in progress; `!!/pull` to force")

# Make sure git credentials are set up
if git.config("--get", "user.name", _ok_code=[0, 1]) == "":
return (False, "Tell someone to run `git config user.name \"SmokeDetector\"`")
Expand Down Expand Up @@ -235,8 +228,4 @@ def get_remote_diff():

@staticmethod
def pull_remote():
try:
rmdir('gitmanager.lock')
except FileNotFoundError:
pass
git.pull()

0 comments on commit ba77445

Please sign in to comment.