Skip to content

Commit 7ba7587

Browse files
marcgpuignsubiron
authored andcommitted
Few fixes
1 parent 070aae5 commit 7ba7587

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

Docs/asset_packages_for_dist.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Import
109109
│ │ ├── LaneMarking1_Spec.png
110110
│ │ ├── MapToImport01.fbx
111111
│ │ └── MapToImport01.xodr
112-
| ── MapToImport02
112+
| ── MapToImport02
113113
│ │ ├── MapToImport02.fbx
114114
│ │ └── MapToImport02.xodr
115115
| ├── AssetsToImport

Util/BuildTools/Import.py

+2-19
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,12 @@
1818
import shutil
1919
import subprocess
2020

21-
22-
@contextmanager
23-
def pushd(directory):
24-
"""Context manager to temporally change working directory."""
25-
cwd = os.getcwd()
26-
try:
27-
os.chdir(directory)
28-
yield
29-
finally:
30-
os.chdir(cwd)
31-
32-
3321
# Global variables
3422
IMPORT_SETTING_FILENAME = "importsetting.json"
3523
SCRIPT_NAME = os.path.basename(__file__)
3624
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
37-
CARLA_ROOT_PATH = ""
38-
# Temporary get into current script folder to find Carla root path
39-
with pushd(SCRIPT_DIR):
40-
# Go two directories above the current one
41-
os.chdir(os.path.pardir)
42-
os.chdir(os.path.pardir)
43-
CARLA_ROOT_PATH = os.getcwd()
25+
# Go two directories above the current script
26+
CARLA_ROOT_PATH = os.path.normpath(SCRIPT_DIR + '/../..')
4427

4528

4629
def get_packages_json_list(folder):

Util/BuildTools/Linux.mk.help

+2
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ for developers:
9999

100100
Prettify code files. Run uncrustify on C++ files or AutoPEP8 on Python
101101
files. To prettify a single file, use: make pretty ARGS=-f/path/to/file.
102+
103+

0 commit comments

Comments
 (0)