#!/usr/bin/env python
# Unix SMB/CIFS implementation.
+# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008-2012
# Copyright (C) Amitay Isaacs <amitay@gmail.com> 2011
# Copyright (C) Giampaolo Lauria <lauria2@yahoo.com> 2011
#
# Find right direction when running from source tree
sys.path.insert(0, "bin/python")
+# make sure the script dies immediately when hitting control-C,
+# rather than raising KeyboardInterrupt. As we do all database
+# operations using transactions, this is safe.
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
from samba.netcmd.main import cmd_sambatool
cmd = cmd_sambatool()
subcommand = None
print_provision_ranges)
from samba.xattr import copytree_with_xattrs
+# make sure the script dies immediately when hitting control-C,
+# rather than raising KeyboardInterrupt. As we do all database
+# operations using transactions, this is safe.
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
replace=2**FLAG_MOD_REPLACE
add=2**FLAG_MOD_ADD
delete=2**FLAG_MOD_DELETE
# -*- coding: utf-8 -*-
#
# provide information on connected users and open files
-# Copyright ǒ Jelmer Vernooij 2008
+# Copyright (c) Jelmer Vernooij 2008
#
# Based on the original in EJS:
# Copyright Andrew Tridgell 2005
import os, sys
+# make sure the script dies immediately when hitting control-C,
+# rather than raising KeyboardInterrupt. As we do all database
+# operations using transactions, this is safe.
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
sys.path.insert(0, "bin/python")
import optparse
import sys
+# make sure the script dies immediately when hitting control-C,
+# rather than raising KeyboardInterrupt. As we do all database
+# operations using transactions, this is safe.
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
PyModule_AddObject(m, "version",
PyString_FromString(SAMBA_VERSION_STRING));
-
- /* one of the most annoying things about python scripts is
- that they don't die when you hit control-C. This fixes that
- sillyness. As we do all database operations using
- transactions, this is also safe.
- */
- signal(SIGINT, SIG_DFL);
}