Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
c7837235
Commit
c7837235
authored
Jan 17, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some other coding style issues
parent
f675a3cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
weblate/trans/filelock.py
weblate/trans/filelock.py
+4
-4
No files found.
weblate/trans/filelock.py
View file @
c7837235
...
@@ -39,9 +39,9 @@ class FileLock(object):
...
@@ -39,9 +39,9 @@ class FileLock(object):
start_time
=
time
.
time
()
start_time
=
time
.
time
()
while
True
:
while
True
:
try
:
try
:
self
.
fd
=
os
.
open
(
self
.
handle
=
os
.
open
(
self
.
lockfile
,
self
.
lockfile
,
os
.
O_CREAT
|
os
.
O_EXCL
|
os
.
O_RDWR
os
.
O_CREAT
|
os
.
O_EXCL
|
os
.
O_RDWR
)
)
break
break
except
OSError
as
e
:
except
OSError
as
e
:
...
@@ -59,7 +59,7 @@ class FileLock(object):
...
@@ -59,7 +59,7 @@ class FileLock(object):
called at the end.
called at the end.
"""
"""
if
self
.
is_locked
:
if
self
.
is_locked
:
os
.
close
(
self
.
fd
)
os
.
close
(
self
.
handle
)
os
.
unlink
(
self
.
lockfile
)
os
.
unlink
(
self
.
lockfile
)
self
.
is_locked
=
False
self
.
is_locked
=
False
...
@@ -72,7 +72,7 @@ class FileLock(object):
...
@@ -72,7 +72,7 @@ class FileLock(object):
self
.
acquire
()
self
.
acquire
()
return
self
return
self
def
__exit__
(
self
,
typ
e
,
value
,
traceback
):
def
__exit__
(
self
,
typ
,
value
,
traceback
):
"""
"""
Activated at the end of the with statement.
Activated at the end of the with statement.
It automatically releases the lock if it isn't locked.
It automatically releases the lock if it isn't locked.
...
...
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