summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-11-08 12:26:54 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-11-08 12:26:54 +0100
commitc95f317d586bbd4313f705c5618f0fd5477cb210 (patch)
tree84cad5576a94826d06189de21d455f983106f956
parent0c25f9a6b20e11059805f55928cec5bcd18fbf6b (diff)
downloadpsutil-c95f317d586bbd4313f705c5618f0fd5477cb210.tar.gz
try to fix appveyor failure; also refactor generate_manifest.py
-rwxr-xr-xpsutil/tests/test_unicode.py2
-rwxr-xr-xscripts/internal/generate_manifest.py8
2 files changed, 7 insertions, 3 deletions
diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py
index bbb763f3..c2a2f847 100755
--- a/psutil/tests/test_unicode.py
+++ b/psutil/tests/test_unicode.py
@@ -207,7 +207,7 @@ class _BaseFSAPIsTests(object):
def test_proc_open_files(self):
p = psutil.Process()
start = set(p.open_files())
- with open(self.funky_name, 'wb'):
+ with open(self.funky_name, 'rb'):
new = set(p.open_files())
path = (new - start).pop().path
self.assertIsInstance(path, str)
diff --git a/scripts/internal/generate_manifest.py b/scripts/internal/generate_manifest.py
index 8b6b4f5f..3511b749 100755
--- a/scripts/internal/generate_manifest.py
+++ b/scripts/internal/generate_manifest.py
@@ -12,6 +12,10 @@ import os
import subprocess
+IGNORED_EXTS = ('.png', '.jpg', '.jpeg')
+IGNORED_FILES = ('.travis.yml', 'appveyor.yml')
+
+
def sh(cmd):
return subprocess.check_output(
cmd, shell=True, universal_newlines=True).strip()
@@ -21,8 +25,8 @@ def main():
files = sh("git ls-files").split('\n')
for file in files:
if file.startswith('.ci/') or \
- os.path.splitext(file)[1] in ('.png', '.jpg') or \
- file in ('.travis.yml', 'appveyor.yml'):
+ os.path.splitext(file)[1].lower() in IGNORED_EXTS or \
+ file in IGNORED_FILES:
continue
print("include " + file)