[PATCH] python/osmo-python-tests[master]: Fix install in the presence of old modules

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Mon Jan 15 13:25:36 UTC 2018


Review at  https://gerrit.osmocom.org/5793

Fix install in the presence of old modules

If older incompatible version of osmopython is already available, it
might be chosen fori mport instead of current version. Fix this by
explicitly prepending the proper version to path.

Change-Id: Icbe2af1e3815406213be29e0c0360432dc9fd6fb
Related: OS#2821
---
M tests/test_py3.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/93/5793/1

diff --git a/tests/test_py3.py b/tests/test_py3.py
index 1c0c19b..0d526a9 100644
--- a/tests/test_py3.py
+++ b/tests/test_py3.py
@@ -7,7 +7,7 @@
 # we have to use this ugly hack to workaroundbrokenrelative imports in py3:
 # from ..osmopy.osmo_ipa import Ctrl
 # does not work as expected
-sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
 from osmopy.osmo_ipa import Ctrl
 from osmopy import __version__
 

-- 
To view, visit https://gerrit.osmocom.org/5793
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbe2af1e3815406213be29e0c0360432dc9fd6fb
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list