Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
1891008e
authored
Mar 11, 2015
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mount_smb()
parent
5ab1348f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
notify.py
+9
-3
No files found.
notify.py
View file @
1891008e
...
...
@@ -145,9 +145,15 @@ def mount_smb(url):
data
=
urlsplit
(
url
)
share
=
data
.
path
.
lstrip
(
'/'
)
subprocess
.
call
((
'net'
,
'use'
,
'Z:'
,
'/delete'
))
subprocess
.
check_output
((
'net'
,
'use'
,
'Z:'
,
r'\\
%
s\%s'
%
(
data
.
hostname
,
share
),
data
.
password
,
'/user:
%
s'
%
data
.
username
,
'/PERSISTENT:YES'
))
try
:
p
=
subprocess
.
Popen
((
'net'
,
'use'
,
'Z:'
,
r'\\
%
s\%s'
%
(
data
.
hostname
,
share
),
data
.
password
,
'/user:
%
s'
%
data
.
username
,
'/PERSISTENT:YES'
),
stderr
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
)
logger
.
info
(
'mount_smb():
%
s'
,
p
.
communicate
())
except
:
logger
.
exception
(
'Unhandled exception: '
)
def
file_already_exists
(
name
,
mode
=
0
o644
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment