Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
apps
generator
Commits
41c7b890
Verified
Commit
41c7b890
authored
2 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
error handle chdir
parent
ff36d4e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library.py
+12
-1
12 additions, 1 deletion
library.py
with
12 additions
and
1 deletion
library.py
+
12
−
1
View file @
41c7b890
from
curses.ascii
import
isdigit
import
os
,
re
from
os
import
path
from
os.path
import
exists
from
sys
import
exc_info
import
yaml
from
natsort
import
natsorted
from
generator
import
helper
,
format
...
...
@@ -8,7 +10,16 @@ from generator import helper, format
def
save_tag
(
localroot
,
root
,
filename
,
tag
):
return_tag
=
""
os
.
chdir
(
root
)
try
:
os
.
chdir
(
root
)
print
(
"
Current working directory: {0}
"
.
format
(
os
.
getcwd
()))
except
FileNotFoundError
:
print
(
"
Directory: {0} does not exist
"
.
format
(
root
))
except
NotADirectoryError
:
print
(
"
{0} is not a directory
"
.
format
(
root
))
except
PermissionError
:
print
(
"
You do not have permissions to change to {0}
"
.
format
(
root
))
length_tag
=
len
(
tag
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment