Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Jan 21, 2014
  1. Retain references to workspace event handlers (see #10)

    authored
    This avoids the possibility of handlers being collected before the
    actual notification firing.
    
    Thanks to crc@google.com for the patch
Commits on Jan 11, 2012
  1. do_shell: handle null user_info values

    authored
    Some users have encountered the situation where user_info is present but None:
    
    http://code.google.com/p/pymacadmin/issues/detail?id=7
Commits on Oct 12, 2010
  1. Nigel Kersten

    Initial checkin of pymacds module

    nigelkersten authored committed
  2. Nigel Kersten
  3. Added a basic .hgignore

    authored
  4. Simplified import logic: non-default config file paths will be added …

    authored
    …to the python path, allowing everything to be in one directory
  5. Added a simple FSEvents example

    authored
Commits on Jul 17, 2009
Commits on Jun 8, 2009
  1. Support for building OS X pkg files using bdist_mpkg

    authored
    --HG--
    extra : convert_revision : ccd5589
  2. Ignore noseids

    authored
    --HG--
    extra : convert_revision : 7fb3175
  3. Distutils support

    authored
    Standard "python setup.py install" support which installs the frameworks
    and the command-line programs in sbin/
    
    --HG--
    extra : convert_revision : eae2c41
  4. Carbon wrapper cleanup

    authored
    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
    
    --HG--
    extra : convert_revision : 85e247d
  5. Keychain cleanup

    authored
    - 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
    
    --HG--
    extra : convert_revision : f12b91e
Commits on May 9, 2009
  1. Keychain regression fixes

    authored
    Fixed a crash caused by calling SecKeychainFreeAttributeInfo on an
    attribute list. Sigh...
    
    --HG--
    extra : convert_revision : 1c6f52a
  2. Merge commit '8f7604a6e7c6ca65d132ac54c7e14d2cb7112c1b'

    authored
    --HG--
    extra : convert_revision : 9e0e8fd
Commits on Apr 12, 2009
  1. Initial crankd restructuring

    authored
    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
    
    --HG--
    extra : convert_revision : 504e737
  2. Whitespace removal

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

    authored
    --HG--
    extra : convert_revision : 8f7604a
  2. Improved file path & command-line handling

    authored
    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__
    
    --HG--
    extra : convert_revision : 27276db
  3. Improved shell handling of NSWorkspace events

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

    authored
    Added:
    	Simple install script
    	Improved text-to-speech for events
    
    Removed:
    	examples/crankd/sample-of-events/crankd-config.plist
    
    --HG--
    extra : convert_revision : aab1e80
  2. Removed stale files

    authored
    --HG--
    extra : convert_revision : 3cdb2f8
Commits on Mar 21, 2009
  1. Keychain cleanup

    authored
    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
    
    --HG--
    extra : convert_revision : 649dae5
  2. Merge branch 'master' of git@github.com:acdha/pymacadmin

    authored
    --HG--
    extra : convert_revision : 60630db
  3. Keychain label support

    authored
    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.
    
    --HG--
    extra : convert_revision : d12eed8
Commits on Mar 17, 2009
  1. Clinton Blackmore

    Readme file was actually markdown, not reStructured Text.

    clintonblackmore authored
    Signed-off-by: Chris Adams <chris@improbable.org>
    committer: Chris Adams <chris@improbable.org>
    
    --HG--
    extra : convert_revision : 8152a97
Commits on Mar 15, 2009
  1. Keychain Overhaul

    authored
    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 delete-certificate.py temporarily until this can all be merged
    into a consolidated bin/keychain.py
    
    --HG--
    extra : convert_revision : b53119f
Commits on Mar 13, 2009
  1. Clinton Blackmore's sample-of-events demo

    authored
    An example which attempts to monitor every event supported on the
    current system - see this mailing list thread:
    
    http://groups.google.com/group/pymacadmin/browse_thread/thread/15060f66cab0b42d
    
    --HG--
    extra : convert_revision : a0cf487
  2. Misc bugfixes reported by Clinton

    authored
    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 subprocess.call()
    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
    form.
    
    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
    
    --HG--
    extra : convert_revision : 6f8fd8a
Commits on Mar 11, 2009
  1. Merge branch 'master' of git@github.com:acdha/pymacadmin

    authored
    --HG--
    extra : convert_revision : 4a9471a
  2. Switch to OptionParser/Logging

    authored
    Logging is now used to provide variable output levels
    Command-line processing now uses optparse
    
    --HG--
    extra : convert_revision : d2abc29
  3. Fix for #1 (settings shared across locations)

    authored
    Network services (e.g. IPv4 or IPv6) are stored separately under /NetworkServices - before we only copied the link rather than the settings themselves.
    
    --HG--
    extra : convert_revision : e0095a9
  4. Merge branch 'master' of git@github.com:acdha/pymacadmin

    authored
    --HG--
    extra : convert_revision : a4dcfa7
  5. Switch to OptionParser/Logging

    adamsc authored
    Logging is now used to provide variable output levels
    Command-line processing now uses optparse
    
    
    git-svn-id: https://pymacadmin.googlecode.com/svn/trunk@36 a06d0699-be4d-0410-9b60-b1b7deb0f677
    
    --HG--
    extra : convert_revision : 0ecfa48
  6. Fix for issue 1 where settings were incorrectly shared across locations

    adamsc authored
    because network services (e.g. IPv4 or IPv6) are stored as links to
    separate branches under /NetworkServices - before we only copied the
    link rather than the settings themselves.
    
    
    git-svn-id: https://pymacadmin.googlecode.com/svn/trunk@35 a06d0699-be4d-0410-9b60-b1b7deb0f677
    
    --HG--
    extra : convert_revision : 0198a6e
Something went wrong with that request. Please try again.