MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _safe_int

Method _safe_int

db_manager.py:535–540  ·  view source on GitHub ↗

Safely convert value to integer.

(self, value, default=0)

Source from the content-addressed store, hash-verified

533 logger.info(f"✅ Successfully migrated {migrated_count} hosts from CSV to SQLite")
534
535 # Backup CSV after successful migration
536 backup_path = self.netkb_csv + '.migrated_backup'
537 if not os.path.exists(backup_path):
538 import shutil
539 shutil.copy2(self.netkb_csv, backup_path)
540 logger.info(f"CSV backed up to: {backup_path}")
541
542 except Exception as e:
543 logger.error(f"CSV migration failed: {e}")

Callers 1

_migrate_from_csvMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected