Switch branches/tags
Nothing to show
Commits on Jan 16, 2016
  1. Merge pull request #13 from ccaviness/master

    ccaviness committed Jan 16, 2016
    Support for regexes, clearer logging, handle missing user_info
Commits on Jan 15, 2016
  1. Support for regexes, clearer logging, handle missing user_info

    ccaviness committed Jan 15, 2016
    SCDynamicStoreSetNotificationKeys actually takes regular expressions for the list of keys. Update handle_sc_event to try straight matches first, then go through them as regular expressions.
    Prepend the pathname/pid to all logging messages.
    Handle missing user_info in do_shell kwargs.
Commits on Jun 3, 2015
  1. Merge pull request #12 from ccaviness/super

    ccaviness committed Jun 3, 2015
    Use objc.super instead of builtin to support newer PyObjC installs
Commits on Jan 21, 2014
  1. Retain references to workspace event handlers (see #10)

    acdha committed Jan 21, 2014
    This avoids the possibility of handlers being collected before the
    actual notification firing.
    Thanks to for the patch
Commits on Jan 11, 2012
  1. do_shell: handle null user_info values

    acdha committed Jan 11, 2012
    Some users have encountered the situation where user_info is present but None:
Commits on Oct 12, 2010
  1. Added a basic .hgignore

    acdha committed Aug 15, 2009
  2. Simplified import logic: non-default config file paths will be added …

    acdha committed Aug 15, 2009
    …to the python path, allowing everything to be in one directory
  3. Added a simple FSEvents example

    acdha committed Aug 15, 2009
Commits on Jul 17, 2009
Commits on Jun 8, 2009
  1. Support for building OS X pkg files using bdist_mpkg

    acdha committed Jun 8, 2009
    extra : convert_revision : ccd5589
  2. Ignore noseids

    acdha committed Jun 8, 2009
    extra : convert_revision : 7fb3175
  3. Distutils support

    acdha committed Jun 8, 2009
    Standard "python install" support which installs the frameworks
    and the command-line programs in sbin/
    extra : convert_revision : eae2c41
  4. Carbon wrapper cleanup

    acdha committed Jun 8, 2009
    Renamed carbon_errcheck() to more explanatory checked_carbon_call()
    checked_carbon_call() now raises KeyError for Carbon calls which return errKCItemNotFound (keychain item not found)
    Updated docs for checked_carbon_call()
    Removed the unnecessary carbon_call() function left over from testing
    extra : convert_revision : 85e247d
  5. Keychain cleanup

    acdha committed Jun 8, 2009
    - Fixed unit test failure if your keychain happens not to have the Airport SSID being tested - for this purpose, a KeyError is considered a successful call
    - Changed find_generic_password to assert that at least one label item be returned by SecKeychainItemCopyAttributesAndData, avoiding a spurious assert failure in certain cases
    extra : convert_revision : f12b91e
Commits on May 9, 2009
  1. Keychain regression fixes

    acdha committed May 9, 2009
    Fixed a crash caused by calling SecKeychainFreeAttributeInfo on an
    attribute list. Sigh...
    extra : convert_revision : 1c6f52a
  2. Merge commit '8f7604a6e7c6ca65d132ac54c7e14d2cb7112c1b'

    acdha committed May 9, 2009
    extra : convert_revision : 9e0e8fd
Commits on Apr 12, 2009
  1. Initial crankd restructuring

    acdha committed Apr 12, 2009
    Handlers moved into crankd.handlers
    Removed separate logger variables - we'll just use the logging class directly unless someone has a very good reason not to
    Renamed NotificationHandler class to NSNotificationHandler to make it clear that this is specific to NSNotification, since that implies inheriting from NSObject
    extra : convert_revision : 504e737
  2. Whitespace removal

    acdha committed Apr 12, 2009
    extra : convert_revision : 8e5e3aa
Commits on Apr 10, 2009
  1. doctest fix - added +ELLIPSIS for handle value

    acdha committed Apr 10, 2009
    extra : convert_revision : 8f7604a
  2. Improved file path & command-line handling

    acdha committed Apr 10, 2009
    config_file is now always run through os.path.realpath() to avoid issues with relative paths
    sys.argv is rewritten in process_commandline() to ensure that it always contains file names which have been processed by realpath()
    Logging is now configured early in main() so it can be used everywhere
    load_config() now sends its instructions to stderr if you run crankd with a config file which doesn't exist
    The conditional restart logic now uses the filename for __main__
    extra : convert_revision : 27276db
  3. Improved shell handling of NSWorkspace events

    acdha committed Apr 10, 2009
    Now a passed user_info item will be expanded into shell variables so a script
    author can test for e.g. $NSAPPLICATION_BUNDLE_IDENTIFIER,
    	if [ ! -z "${NSAPPLICATION_NAME}" ]; then
    	  say "You appear to be using ${NSAPPLICATION_NAME}"
    	  exit 0
    extra : convert_revision : c6435e3
Commits on Apr 3, 2009
  1. Merged changes from Clinton Blackmore's branch:

    acdha committed Apr 3, 2009
    	Simple install script
    	Improved text-to-speech for events
    extra : convert_revision : aab1e80
  2. Removed stale files

    acdha committed Apr 3, 2009
    extra : convert_revision : 3cdb2f8
Commits on Mar 21, 2009
  1. Keychain cleanup

    acdha committed Mar 21, 2009
    Added module attributes for all of the kSec* defines
    Fixed a bug caused by prematurely releasing the opaque item handle in find_generic_password
    Removed some stale code, comments and unused variables
    extra : convert_revision : 649dae5
  2. Merge branch 'master' of

    acdha committed Mar 21, 2009
    extra : convert_revision : 60630db
  3. Keychain label support

    acdha committed Mar 21, 2009
    The cosmetic difference is that generic passwords now have a label and GenericPassword.__repr__ will use it.
    This involved adding or fixing several struct definitions, multiple constants and dealing with several misleading parts of the Keychain documentation. The next step will be to move this into the classes and expand the support beyond labels to allow any keychain attribute to be retrieved or, finally, updated.
    extra : convert_revision : d12eed8
Commits on Mar 17, 2009
  1. Readme file was actually markdown, not reStructured Text.

    clintonblackmore committed Mar 17, 2009
    Signed-off-by: Chris Adams <>
    committer: Chris Adams <>
    extra : convert_revision : 8152a97
Commits on Mar 15, 2009
  1. Keychain Overhaul

    acdha committed Mar 15, 2009
    Core PyMacAdmin improvements:
    * mac_strerror() provides a way to lookup the error message for Carbon
      return codes
    * carbon_call() simplifies the process of calling a Carbon function and
      automatically checking its return code. A RuntimeError will be raised
      if rc < 0
    * carbon_errcheck() can be used as a ctypes errcheck function using the
      same logic as carbon_call()
    * load_carbon_framework() wraps ctypes.cdll.LoadLibrary() to automatically use carbon_errcheck() for every function in the loaded library
    Added PyMacAdmin.Security declarations for common constants:
    * kSecCertificateItemClass
    Added ctypes.Structures for SecKeychainAttribute, SecKeychainAttributeList, SecKeychainAttributeInfo
    Added temporarily until this can all be merged
    into a consolidated bin/
    extra : convert_revision : b53119f
Commits on Mar 13, 2009
  1. Clinton Blackmore's sample-of-events demo

    acdha committed Mar 13, 2009
    An example which attempts to monitor every event supported on the
    current system - see this mailing list thread:
    extra : convert_revision : a0cf487
  2. Misc bugfixes reported by Clinton

    acdha committed Mar 13, 2009
    logging could fail if given an excessively long message. This happened
    primarily with the event key lists, which now use log_list() which takes
    the message template and keys and splits into multiple sub-1024
    character messages as needed.
    do_shell() attempted to pass all of its parameters to
    and broke if there was anything which didn't automatically stringify. It
    now looks only for two keys ("key" and "info") and sets them as
    CRANKD_{key.upper()} to avoid conflicts - we'll probably want to revise
    this list to see which other values are useful for simple scripts.
    Python handlers, of course, still have access to everything in native
    Added a -d/--debug option to set the default logging level and made the
    default file-based log level use the same value as stdout
    extra : convert_revision : 6f8fd8a
Commits on Mar 11, 2009
  1. Merge branch 'master' of

    acdha committed Mar 11, 2009
    extra : convert_revision : 4a9471a
  2. Switch to OptionParser/Logging

    acdha committed Mar 11, 2009
    Logging is now used to provide variable output levels
    Command-line processing now uses optparse
    extra : convert_revision : d2abc29