[LON-CAPA-cvs] cvs: loncom /debugging_tools clean_db.pl

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 16 Aug 2008 14:36:09 -0000


raeburn		Sat Aug 16 10:36:09 2008 EDT

  Modified files:              
    /loncom/debugging_tools	clean_db.pl 
  Log:
  Fix syntax errors introduced by rev 1.4 "speed up".
  
  
Index: loncom/debugging_tools/clean_db.pl
diff -u loncom/debugging_tools/clean_db.pl:1.4 loncom/debugging_tools/clean_db.pl:1.5
--- loncom/debugging_tools/clean_db.pl:1.4	Mon Apr  2 20:59:45 2007
+++ loncom/debugging_tools/clean_db.pl	Sat Aug 16 10:36:09 2008
@@ -4,7 +4,7 @@
 #
 # dump_db.pl - dump a GDBM database to standard output, unescaping if asked to.
 #
-# $Id: clean_db.pl,v 1.4 2007/04/03 00:59:45 albertel Exp $
+# $Id: clean_db.pl,v 1.5 2008/08/16 14:36:09 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,13 +65,13 @@
     warn("Unable to tie to $fname");
     exit;
 }
-if (exists($dbref->{$key_to_remove}) {
-    delete($dbref->{$key});
+if (exists($dbref->{$key_to_remove})) {
+    delete($dbref->{$key_to_remove});
     if ($fname =~ m|/nohist_[^/]*.db|) { exit; }
     my $hist=$fname;
     $hist=~s/\.db$/.hist/;
     open(HIST,">>$hist");
-    print HIST ("D:".time.":$key\n");
+    print HIST ("D:".time.":$key_to_remove\n");
     close(HIST);
 }
 exit;