Skip to content

Commit

Permalink
Small fixes to make python2.6 happy
Browse files Browse the repository at this point in the history
Ignore-this: cfd1840daabf3437811171be126929bb

darcs-hash:20090507132703-20ca2-ef21f62dc25fd6e1497beae6128727114394e0bf.gz
  • Loading branch information
scudette committed May 7, 2009
1 parent 789a3d0 commit d402124
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/plugins/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ def display(self,query,result):

## IO subsystem unit tests:
import unittest
import md5,random,time
import random,time
from hashlib import md5
import pyflag.tests as tests
from pyflag.FileSystem import DBFS

Expand Down
3 changes: 2 additions & 1 deletion src/plugins/DiskForensics/FileSystems/Sleuthkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ def reset(self, dbh, case):
SKCACHE.expire(cache_key)

## Unit Tests:
import unittest, md5
import unittest
from hashlib import md5
import pyflag.pyflagsh as pyflagsh
import pyflag.tests as tests

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/DiskForensics/HashComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from pyflag.Scanner import *
from pyflag.ColumnTypes import StringType, TimestampType, InodeIDType, FilenameType, ColumnType

import md5
from hashlib import md5

config.add_option('hashdb', short_option='H', default="nsrldb",
help = "The database which will be used to store hash sets (like nsrl)")
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/Flash/BasicCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ def execute(self):
yield "Created Case %s" % case

## Unit tests:
import unittest,md5
import unittest
from hashlib import md5
import pyflag.pyflagsh as pyflagsh
import pyflag.tests

Expand Down
3 changes: 2 additions & 1 deletion src/plugins/LoadData.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ def reset(self,query):


## Unit Tests:
import unittest, md5
import unittest
from hashlib import md5
import pyflag.pyflagsh as pyflagsh
from pyflag.FileSystem import DBFS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"""
import os,optparse
import struct
import sha
from time import gmtime, strftime

from vutils import is_crash_dump
Expand Down
11 changes: 7 additions & 4 deletions src/plugins/TableRenderers/HTMLBundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,14 @@ def export(self, case, inode_id, table_renderer):
result.heading("How to derive inode %s" % fd.inode)

filename = "inodes/%s_explain.html" % inode_id
if not table_renderer.filename_in_archive(filename):
result = HTMLUI.HTMLUI(initial = True)
result.heading("How to derive inode %s" % fd.inode)

result.decoration='naked'
fd.explain(None, result)

result.decoration='naked'
fd.explain(None, result)

table_renderer.add_file_from_string(filename, result.display())
table_renderer.add_file_from_string(filename, result.display())

def render_html(self, inode_id, table_renderer):
dbh = DB.DBO()
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/Urwid/urwid/listbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ListWalkerError(Exception):
pass

class ListWalker(object):
__metaclass__ = MetaSignals
#__metaclass__ = MetaSignals

signals = ["modified"]

Expand Down
3 changes: 2 additions & 1 deletion src/pyflag/IO.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def open(case, iosource):

## IO subsystem unit tests:
import unittest
import md5,random,time
import random,time
from hashlib import md5

def test_read_random(io1,io2, size, sample_size, number):
""" Tests if both ios return the same data for random input """
Expand Down
1 change: 1 addition & 0 deletions src/pyflag/ScannerUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def find_dependencies(scanner, dependancies):
find_dependencies(s, dependancies)
elif s in groups:
for g in groups[s]:
print g
#name = ("%s" % g).split(".")[-1]
name = g.name
dependancies.append(name)
Expand Down
2 changes: 1 addition & 1 deletion tests/launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ INSTALL_DIR=/var/tmp/build/pyflag/
## can find it itself)

export PYFLAG_PLUGINS=$SRC_DIR/src/plugins
export PYTHONPATH=$SRC_DIR/src/pyflag:$SRC_DIR/src/:/usr/loca/lib/python2.5/site-packages/:$INSTALL_DIR/lib/python2.5/site-packages/pyflag:$INSTALL_DIR/lib/python2.4/site-packages/pyflag
export PYTHONPATH=$SRC_DIR/src/pyflag:$SRC_DIR/src/:/usr/local/lib/python2.6/site-packages/:/usr/local/lib/python2.5/site-packages/:$INSTALL_DIR/lib/python2.5/site-packages/pyflag:$INSTALL_DIR/lib/python2.4/site-packages/pyflag:$INSTALL_DIR/lib/python2.6/site-packages/pyflag

$@
4 changes: 2 additions & 2 deletions tests/pyflag
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ INSTALL_DIR=/var/tmp/build/pyflag/

######### END CONFIGURATION ####################

export PYTHONPATH=$SRC_DIR/src/pyflag:$SRC_DIR/src/:/usr/loca/lib/python2.5/site-packages/:$INSTALL_DIR/lib/python2.5/site-packages/pyflag
export PYTHONPATH=$SRC_DIR/src/pyflag:$SRC_DIR/src/:/usr/loca/lib/python2.6/site-packages/:$INSTALL_DIR/lib/python2.6/site-packages/pyflag

exec /usr/bin/python2.5 $SRC_DIR/src/pyflag/FlagHTTPServer.py --plugins=$SRC_DIR/src/plugins $@
exec /usr/bin/python2.6 $SRC_DIR/src/pyflag/FlagHTTPServer.py --plugins=$SRC_DIR/src/plugins $@

0 comments on commit d402124

Please sign in to comment.