Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
6d34ef1f
Commit
6d34ef1f
authored
11 years ago
by
Branson Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Oops. This should have been lumped together with the previous
commit. Here, self.version is set on the VersionedFile object.
parent
9181e5fd
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
utils/vfile.py
+8
-1
8 additions, 1 deletion
utils/vfile.py
with
8 additions
and
1 deletion
utils/vfile.py
+
8
−
1
View file @
6d34ef1f
...
@@ -50,8 +50,12 @@ class VersionedFile(file):
...
@@ -50,8 +50,12 @@ class VersionedFile(file):
self
.
log
.
debug
(
self
.
log
.
debug
(
"
opening file
'
{0}
'
with mode
'
{1}
'"
"
opening file
'
{0}
'
with mode
'
{1}
'"
.
format
(
actual_name
,
mode
))
.
format
(
actual_name
,
mode
))
# XXX I, Branson, want version to be a property of the file object.
# It is probably stupid to have the local 'version' too (i.e., the
# one scoped inside of this __init__). But I'm reluctant to mess with
# Brian's code too much.
self
.
version
=
version
file
.
__init__
(
self
,
actual_name
,
*
args
,
**
kwargs
)
file
.
__init__
(
self
,
actual_name
,
*
args
,
**
kwargs
)
return
# Otherwise...
# Otherwise...
...
@@ -113,6 +117,9 @@ class VersionedFile(file):
...
@@ -113,6 +117,9 @@ class VersionedFile(file):
if
failedAttempts
>=
5
:
if
failedAttempts
>=
5
:
raise
IOError
(
"
Too many attempts to open file
"
)
raise
IOError
(
"
Too many attempts to open file
"
)
# XXX As above in the writing case. We simply want version to
# be an accessible property of the file object.
self
.
version
=
version
def
_name_for_version
(
self
,
version
):
def
_name_for_version
(
self
,
version
):
if
version
is
None
:
if
version
is
None
:
...
...
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