BackupPC-users

Re: [BackupPC-users] Archive function

2012-03-15 12:30:16
Subject: Re: [BackupPC-users] Archive function
From: Rob Hasselbaum <rob AT hasselbaum DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 15 Mar 2012 12:04:55 -0400
2012/3/15 Philip Kimgård <kimme_911 AT hotmail DOT com>
Thank you! The list approved the attachment and I tested it on the server, though, there's seem to be a problem with the part that returns a list of hosts from the hosts file. Only the part of the hostname before the first dot(.) gets returned, not the complete hostname (example, 192 gets returned instead of 192.168.x.x). I'm pretty new to both linux and backuppc, and have no experience in python what-so-ever, can you identify the problem? 


Sorry, on my box, all host names are single words, not IP addresses or fully-qualified domain names.

Try changing this line:

match = re.match('(?!\s*#)(?!host)(?!localhost)\w+', line)

To this:

match = re.match('(?!\s*#)(?!host)(?!localhost)\S+', line)

That should fix it.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/