Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/77711


Change subject: Make repos.yaml be read from relative path of src
......................................................................

Make repos.yaml be read from relative path of src

Change-Id: I66a8d9d804e654f1291b14809f24dd5d6fd13295
---
R repos.yaml
M src/github-to-gerrit.py
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/SuchABot 
refs/changes/11/77711/1

diff --git a/src/repos.yaml b/repos.yaml
similarity index 100%
rename from src/repos.yaml
rename to repos.yaml
diff --git a/src/github-to-gerrit.py b/src/github-to-gerrit.py
index 2e2dc19..5cd6978 100644
--- a/src/github-to-gerrit.py
+++ b/src/github-to-gerrit.py
@@ -12,9 +12,11 @@
 
 BASE_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
 CONFIG_PATH = os.path.join(BASE_PATH, 'config.yaml')
+REPOS_PATH = os.path.join(BASE_PATH, 'repos.yaml')
 WORKING_DIR = os.path.expanduser("~/.sucharepos")
 
-REPOS_MAPPING = yaml.load(open('repos.yaml'))
+with open(REPOS_PATH) as f:
+    REPOS_MAPPING = yaml.load(f)
 REPOS_GITHUB_TO_GERRIT = REPOS_MAPPING['repos']
 REPOS_GERRIT_TO_GITHUB = {v:k for k, v in REPOS_GITHUB_TO_GERRIT.iteritems()}
 OWNER = "wikimedia"

-- 
To view, visit https://gerrit.wikimedia.org/r/77711
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66a8d9d804e654f1291b14809f24dd5d6fd13295
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/SuchABot
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to