#!/usr/bin/env python

#-------------------------------------------------------------------------------
# Name:        process_album(data)
# Purpose:     Splits the band data into (band, album, album year)
#
# Author:      Christopher Conly
#
# Created:     08/03/2012
# Copyright:   (c) Christopher Conly 2012
#
# CSE 1310 - University of Texas at Arlington
#-------------------------------------------------------------------------------

def process_album(data):
    if type(data) != str:
        print "Argument type error. The argument must be a string."
        return None
    try:
        info = data.split('-')
        band = info[0]
        album = info[1]
        band = band.strip(' ')
        album_info = album.strip('\n\r\t )').split(' (')
        return (band, album_info[0], album_info[1])
    except:
        print 'Error processing album string.'
        return None



