Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
a3603385
Commit
a3603385
authored
14 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
STORM-168 : Python modules cleanup
parent
71507653
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/lib/python/indra/util/named_query.py
+0
-12
0 additions, 12 deletions
indra/lib/python/indra/util/named_query.py
indra/lib/python/uuid.py
+8
-2
8 additions, 2 deletions
indra/lib/python/uuid.py
scripts/install.py
+0
-12
0 additions, 12 deletions
scripts/install.py
with
8 additions
and
26 deletions
indra/lib/python/indra/util/named_query.py
+
0
−
12
View file @
a3603385
...
...
@@ -36,14 +36,6 @@
import
re
import
time
#import sys # *TODO: remove. only used in testing.
#import pprint # *TODO: remove. only used in testing.
try
:
set
=
set
except
NameError
:
from
sets
import
Set
as
set
from
indra.base
import
llsd
from
indra.base
import
config
...
...
@@ -195,8 +187,6 @@ def _convert_sql(self, sql):
style. It also has to look for %:name% and :name% and
ready them for use in LIKE statements
"""
if
sql
:
#print >>sys.stderr, "sql:",sql
# This first sub is to properly escape any % signs that
# are meant to be literally passed through to mysql in the
# query. It leaves any %'s that are used for
...
...
@@ -408,7 +398,6 @@ def _construct_sql(self, params):
# build the query from the options available and the params
base_query
=
[]
base_query
.
append
(
self
.
_base_query
)
#print >>sys.stderr, "base_query:",base_query
for
opt
,
extra_where
in
self
.
_options
.
items
():
if
type
(
extra_where
)
in
(
dict
,
list
,
tuple
):
if
opt
in
params
:
...
...
@@ -418,7 +407,6 @@ def _construct_sql(self, params):
base_query
.
append
(
extra_where
)
if
self
.
_query_suffix
:
base_query
.
append
(
self
.
_query_suffix
)
#print >>sys.stderr, "base_query:",base_query
full_query
=
'
\n
'
.
join
(
base_query
)
# Go through the query and rewrite all of the ones with the
...
...
This diff is collapsed.
Click to expand it.
indra/lib/python/uuid.py
+
8
−
2
View file @
a3603385
...
...
@@ -446,8 +446,14 @@ def uuid1(node=None, clock_seq=None):
def
uuid3
(
namespace
,
name
):
"""
Generate a UUID from the MD5 hash of a namespace UUID and a name.
"""
import
md5
hash
=
md5
.
md5
(
namespace
.
bytes
+
name
).
digest
()
try
:
# Python 2.6
from
hashlib
import
md5
except
ImportError
:
# Python 2.5 and earlier
from
md5
import
new
as
md5
hash
=
md5
(
namespace
.
bytes
+
name
).
digest
()
return
UUID
(
bytes
=
hash
[:
16
],
version
=
3
)
def
uuid4
():
...
...
This diff is collapsed.
Click to expand it.
scripts/install.py
+
0
−
12
View file @
a3603385
...
...
@@ -84,18 +84,6 @@ def add_indra_lib_path():
from
indra.base
import
llsd
from
indra.util
import
helpformatter
# *HACK: Necessary for python 2.3. Consider removing this code wart
# after etch has deployed everywhere. 2008-12-23 Phoenix
try
:
sorted
=
sorted
except
NameError
:
def
sorted
(
in_list
):
"
Return a list which is a sorted copy of in_list.
"
# Copy the source to be more functional and side-effect free.
out_list
=
copy
.
copy
(
in_list
)
out_list
.
sort
()
return
out_list
class
InstallFile
(
object
):
"
This is just a handy way to throw around details on a file in memory.
"
def
__init__
(
self
,
pkgname
,
url
,
md5sum
,
cache_dir
,
platform_path
):
...
...
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