Conditions | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 1 | import os |
|
5 | 1 | def get_venv_basedir(): |
|
6 | """Returns the base directory of the virtualenv, useful to read configuration and plugins""" |
||
7 | |||
8 | 1 | try: |
|
9 | 1 | import virtualenv |
|
|
|||
10 | raise EnvironmentError("You must be in a virtual environment") |
||
11 | 1 | except Exception: |
|
12 | return os.path.abspath(get_config_vars()['exec_prefix'] + '/../') |
||
13 |