[MERGED] 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:56:46 UTC 2018


Max has submitted this change and it was merged.

Change subject: Fix install in the presence of old modules
......................................................................


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(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: Icbe2af1e3815406213be29e0c0360432dc9fd6fb
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list