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
dd16a25d
Verified
Commit
dd16a25d
authored
2 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
fix directory
parent
41c7b890
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library.py
+4
-13
4 additions, 13 deletions
library.py
with
4 additions
and
13 deletions
library.py
+
4
−
13
View file @
dd16a25d
...
...
@@ -11,15 +11,7 @@ from generator import helper, format
def
save_tag
(
localroot
,
root
,
filename
,
tag
):
return_tag
=
""
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
))
os
.
chdir
(
root
)
length_tag
=
len
(
tag
)
...
...
@@ -89,7 +81,6 @@ def save_legacy_from(localroot, root, filename):
def
get_title
(
localroot
,
root
,
file
):
os
.
chdir
(
root
)
qms_yml
=
False
yml_file
=
""
...
...
@@ -101,11 +92,14 @@ def get_title(localroot, root, file):
else
:
print
(
"
QMS document is not formatted properly.
"
)
elif
"
handbook
"
in
root
:
os
.
chdir
(
root
)
with
open
(
file
,
'
r
'
)
as
f
:
for
line
in
f
:
if
re
.
search
(
r
"
^#+\ .*$
"
,
line
):
title
=
line
break
# change back to the local root
os
.
chdir
(
localroot
)
else
:
title
=
save_tag
(
localroot
,
root
,
file
,
"
title
"
)
...
...
@@ -113,9 +107,6 @@ def get_title(localroot, root, file):
title
=
title
.
replace
(
"
#
"
,
""
)
title
=
title
.
rstrip
(
"
\n\r
"
)
# change back to the local root
os
.
chdir
(
localroot
)
return
title
,
qms_yml
,
yml_file
def
get_sections
(
cardDirs
):
...
...
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