Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IRF-hazi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Janos
IRF-hazi
Commits
ae61b807
Commit
ae61b807
authored
11 years ago
by
Simon Janos
Browse files
Options
Downloads
Patches
Plain Diff
fájl írással/olvasással kapcsolatos hibák kezelése
parent
a2667b08
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
irf_2P-1_242/src/getRouteRules.py
+8
-1
8 additions, 1 deletion
irf_2P-1_242/src/getRouteRules.py
with
8 additions
and
1 deletion
irf_2P-1_242/src/getRouteRules.py
+
8
−
1
View file @
ae61b807
...
...
@@ -13,7 +13,12 @@ args = parser.parse_args()
uri
=
"
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/MSFT_NetRoute
"
try
:
machines
=
csv
.
reader
(
open
(
args
.
machines
,
newline
=
''
))
except
FileNotFoundError
:
print
(
"
Cannot open input file (
"
+
args
.
machines
+
"
)
"
)
exit
(
1
)
for
row
in
machines
:
wsman
=
[
"
wsman
"
,
"
-h
"
,
row
[
0
],
"
-u
"
,
row
[
2
],
"
-p
"
,
row
[
3
],
"
--auth
"
,
"
basic
"
,
"
--non-interactive
"
,
"
enumerate
"
,
"
-N
"
,
"
root/standardcimv2
"
,
uri
]
try
:
...
...
@@ -53,6 +58,8 @@ for row in machines:
except
subprocess
.
CalledProcessError
:
print
(
"
ERROR: could not connect to
"
+
row
[
0
])
except
FileNotFoundError
:
print
(
"
Cannot write output file, directory does not exist or not writable.
"
)
#et = etree.XML(rt.encode('utf-8'))
...
...
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