Re: list-modems patch

2010-10-15 Thread Marcel Holtmann
Hi Alex,

 Sometimes i see 
 
 [r...@alexander-desktop ofono-0.31]# /usr/lib/ofono/test/list-modems 
 [ /huawei5 ]
 Features = sim 
 Powered = 1
 Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
 org.ofono.VoiceCallManager org.ofono.SimManager 
 Online = 0
 Model = E1550
 Manufacturer = huawei
 Serial = 353142033084081
 Revision = 11.608.12.00.143
 [ org.ofono.Phonebook ]
 [ org.ofono.AudioSettings ]
 Traceback (most recent call last):
   File /usr/lib/ofono/test/list-modems, line 61, in module
 print %s = %s % (key, val).encode('ascii')
 
 
 Patch
 
 
 
 diff --git a/test/list-modems b/test/list-modems
 index 557efd5..df1dca8 100755
 --- a/test/list-modems
 +++ b/test/list-modems
 @@ -58,6 +58,10 @@ for path, properties in modems:
 ) for text, icon in
 properties[key] ])
 else:
   val = str(properties[key])
 -   print %s = %s % (key, val)
 +   try:
 +   print %s = %s % (key, val)
 +   except:
 +   continue
 +

can you at least print the key value. Just not printing that property at
all is bad since it is there. Just marking the value as not printable
seems to be the better approach.

Regards

Marcel



   
   Last fully-working script
   
   [ /huawei0 ]
   
   
   del overquote
   
   ServiceNumbers = [Моб. Помощник] = '111' [MTС] =
   '+78003330890' [Служба спасения] = '112' 
   CardIdentifier = 89701012417666587513
   LockedPins = 
   PinRequired = none
   SubscriberIdentity = 250011766658751
   Present = 1
   
   
   [Моб. Помощник] - in russian means Mobile Partner
   [Служба спасения] - rescue rangers :3   
   
   
   
   
   diff --git a/test/list-modems b/test/list-modems
   index 557efd5..59765f9 100755
   --- a/test/list-modems
   +++ b/test/list-modems
   @@ -58,6 +58,10 @@ for path, properties in modems:
   ) for text, icon in
   properties[key] ])
   else:
   val = str(properties[key])
   -   print %s = %s % (key, val)
   -
   +   try:
   +   print %s = %s %
   (key.encode('utf8'), val.encode('utf8'))
   +   except:
   +   print Cannot encode some charcters
   please change locale
   +   else:
   +continue
   print
  
  patch does not apply. Please always check with git am that your patch
  would apply cleanly. And that your mailer doesn't screw it up.
  
  Regards
  
  Marcel
  
  
  
 
 Evolution reformate message anyway
 Please click on link.
 Was checked and applied for me with success
 
 http://pastie.org/pastes/1220422/text

I see a whitespace damage in the patch and it is still not possible to
apply this. Please send a proper patch to the mailing list. You do need
to get your email client fixed anyway.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: list-modems patch

2010-10-15 Thread Marcel Holtmann
Hi Alex,

   Sometimes i see 
   
   [r...@alexander-desktop ofono-0.31]# 
   /usr/lib/ofono/test/list-modems 
   [ /huawei5 ]
   Features = sim 
   Powered = 1
   Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
   org.ofono.VoiceCallManager org.ofono.SimManager 
   Online = 0
   Model = E1550
   Manufacturer = huawei
   Serial = 353142033084081
   Revision = 11.608.12.00.143
   [ org.ofono.Phonebook ]
   [ org.ofono.AudioSettings ]
   Traceback (most recent call last):
 File /usr/lib/ofono/test/list-modems, line 61, in module
   print %s = %s % (key, val).encode('ascii')
   
   
   Patch
   
   
   
   diff --git a/test/list-modems b/test/list-modems
   index 557efd5..df1dca8 100755
   --- a/test/list-modems
   +++ b/test/list-modems
   @@ -58,6 +58,10 @@ for path, properties in modems:
   ) for text, icon in
   properties[key] ])
   else:
 val = str(properties[key])
   -   print %s = %s % (key, val)
   +   try:
   +   print %s = %s % (key, 
   val)
   +   except:
   +   continue
   +
  
  can you at least print the key value. Just not printing that 
  property at
  all is bad since it is there. Just marking the value as not 
  printable
  seems to be the better approach.
  
  Regards
  
  Marcel
  
  
  
 
 Last fully-working script
 
 [ /huawei0 ]
 
 
 del overquote
 
 ServiceNumbers = [Моб. Помощник] = '111' [MTС] =
 '+78003330890' [Служба спасения] = '112' 
 CardIdentifier = 89701012417666587513
 LockedPins = 
 PinRequired = none
 SubscriberIdentity = 250011766658751
 Present = 1
 
 
 [Моб. Помощник] - in russian means Mobile Partner
 [Служба спасения] - rescue rangers :3   
 
 
 
 
 diff --git a/test/list-modems b/test/list-modems
 index 557efd5..59765f9 100755
 --- a/test/list-modems
 +++ b/test/list-modems
 @@ -58,6 +58,10 @@ for path, properties in modems:
 ) for text, icon in
 properties[key] ])
 else:
 val = str(properties[key])
 -   print %s = %s % (key, val)
 -
 +   try:
 +   print %s = %s %
 (key.encode('utf8'), val.encode('utf8'))
 +   except:
 +   print Cannot encode some charcters
 please change locale
 +   else:
 +continue
 print

patch does not apply. Please always check with git am that your patch
would apply cleanly. And that your mailer doesn't screw it up.

Regards

Marcel



   
   Evolution reformate message anyway
   Please click on link.
   Was checked and applied for me with success
   
   http://pastie.org/pastes/1220422/text
  
  I see a whitespace damage in the patch and it is still not possible to
  apply this. Please send a proper patch to the mailing list. You do need
  to get your email client fixed anyway.
  
  Regards
  
  Marcel
  
  
  
 
 Patch verified with applying 2 times.
 File in attach.

if the patch does not apply with git am, it is not ready.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: list-modems patch

2010-10-14 Thread Alexander A Khryukin
В Чтв, 14/10/2010 в 11:45 +0300, Marcel Holtmann пишет:
 Hi Alex,
 
  Sometimes i see 
  
  [r...@alexander-desktop ofono-0.31]# /usr/lib/ofono/test/list-modems 
  [ /huawei5 ]
  Features = sim 
  Powered = 1
  Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
  org.ofono.VoiceCallManager org.ofono.SimManager 
  Online = 0
  Model = E1550
  Manufacturer = huawei
  Serial = 353142033084081
  Revision = 11.608.12.00.143
  [ org.ofono.Phonebook ]
  [ org.ofono.AudioSettings ]
  Traceback (most recent call last):
File /usr/lib/ofono/test/list-modems, line 61, in module
  print %s = %s % (key, val).encode('ascii')
  
  
  Patch
  
  
  
  diff --git a/test/list-modems b/test/list-modems
  index 557efd5..df1dca8 100755
  --- a/test/list-modems
  +++ b/test/list-modems
  @@ -58,6 +58,10 @@ for path, properties in modems:
  ) for text, icon in
  properties[key] ])
  else:
  val = str(properties[key])
  -   print %s = %s % (key, val)
  +   try:
  +   print %s = %s % (key, val)
  +   except:
  +   continue
  +
 
 can you at least print the key value. Just not printing that property at
 all is bad since it is there. Just marking the value as not printable
 seems to be the better approach.
 
 Regards
 
 Marcel
 
 
 

Little fix

diff --git a/test/list-modems b/test/list-modems
index 557efd5..f8f10ac 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -58,6 +58,12 @@ for path, properties in modems:
) for text, icon in
properties[key] ])
else:
val = str(properties[key])
-   print %s = %s % (key, val)
+   try:
+   print %s = %s % (key, val)
+   except:
+   print Script mesaage:maybe wrong ASCII
characters\n
+   else:
+   continue
+

print


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: list-modems patch

2010-10-14 Thread Alexander A Khryukin
В Чтв, 14/10/2010 в 11:45 +0300, Marcel Holtmann пишет:
 Hi Alex,
 
  Sometimes i see 
  
  [r...@alexander-desktop ofono-0.31]# /usr/lib/ofono/test/list-modems 
  [ /huawei5 ]
  Features = sim 
  Powered = 1
  Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
  org.ofono.VoiceCallManager org.ofono.SimManager 
  Online = 0
  Model = E1550
  Manufacturer = huawei
  Serial = 353142033084081
  Revision = 11.608.12.00.143
  [ org.ofono.Phonebook ]
  [ org.ofono.AudioSettings ]
  Traceback (most recent call last):
File /usr/lib/ofono/test/list-modems, line 61, in module
  print %s = %s % (key, val).encode('ascii')
  
  
  Patch
  
  
  
  diff --git a/test/list-modems b/test/list-modems
  index 557efd5..df1dca8 100755
  --- a/test/list-modems
  +++ b/test/list-modems
  @@ -58,6 +58,10 @@ for path, properties in modems:
  ) for text, icon in
  properties[key] ])
  else:
  val = str(properties[key])
  -   print %s = %s % (key, val)
  +   try:
  +   print %s = %s % (key, val)
  +   except:
  +   continue
  +
 
 can you at least print the key value. Just not printing that property at
 all is bad since it is there. Just marking the value as not printable
 seems to be the better approach.
 
 Regards
 
 Marcel
 
 
 

Last fully-working script

[ /huawei0 ]


del overquote

ServiceNumbers = [Моб. Помощник] = '111' [MTС] =
'+78003330890' [Служба спасения] = '112' 
CardIdentifier = 89701012417666587513
LockedPins = 
PinRequired = none
SubscriberIdentity = 250011766658751
Present = 1


[Моб. Помощник] - in russian means Mobile Partner
[Служба спасения] - rescue rangers :3   




diff --git a/test/list-modems b/test/list-modems
index 557efd5..59765f9 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -58,6 +58,10 @@ for path, properties in modems:
) for text, icon in
properties[key] ])
else:
val = str(properties[key])
-   print %s = %s % (key, val)
-
+   try:
+   print %s = %s %
(key.encode('utf8'), val.encode('utf8'))
+   except:
+   print Cannot encode some charcters
please change locale
+   else:
+continue
print


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: list-modems patch

2010-10-14 Thread Marcel Holtmann
Hi Alex,

   Sometimes i see 
   
   [r...@alexander-desktop ofono-0.31]# /usr/lib/ofono/test/list-modems 
   [ /huawei5 ]
   Features = sim 
   Powered = 1
   Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
   org.ofono.VoiceCallManager org.ofono.SimManager 
   Online = 0
   Model = E1550
   Manufacturer = huawei
   Serial = 353142033084081
   Revision = 11.608.12.00.143
   [ org.ofono.Phonebook ]
   [ org.ofono.AudioSettings ]
   Traceback (most recent call last):
 File /usr/lib/ofono/test/list-modems, line 61, in module
   print %s = %s % (key, val).encode('ascii')
   
   
   Patch
   
   
   
   diff --git a/test/list-modems b/test/list-modems
   index 557efd5..df1dca8 100755
   --- a/test/list-modems
   +++ b/test/list-modems
   @@ -58,6 +58,10 @@ for path, properties in modems:
   ) for text, icon in
   properties[key] ])
   else:
 val = str(properties[key])
   -   print %s = %s % (key, val)
   +   try:
   +   print %s = %s % (key, val)
   +   except:
   +   continue
   +
  
  can you at least print the key value. Just not printing that property at
  all is bad since it is there. Just marking the value as not printable
  seems to be the better approach.
  
  Regards
  
  Marcel
  
  
  
 
 Last fully-working script
 
 [ /huawei0 ]
 
 
 del overquote
 
 ServiceNumbers = [Моб. Помощник] = '111' [MTС] =
 '+78003330890' [Служба спасения] = '112' 
 CardIdentifier = 89701012417666587513
 LockedPins = 
 PinRequired = none
 SubscriberIdentity = 250011766658751
 Present = 1
 
 
 [Моб. Помощник] - in russian means Mobile Partner
 [Служба спасения] - rescue rangers :3   
 
 
 
 
 diff --git a/test/list-modems b/test/list-modems
 index 557efd5..59765f9 100755
 --- a/test/list-modems
 +++ b/test/list-modems
 @@ -58,6 +58,10 @@ for path, properties in modems:
 ) for text, icon in
 properties[key] ])
 else:
 val = str(properties[key])
 -   print %s = %s % (key, val)
 -
 +   try:
 +   print %s = %s %
 (key.encode('utf8'), val.encode('utf8'))
 +   except:
 +   print Cannot encode some charcters
 please change locale
 +   else:
 +continue
 print

patch does not apply. Please always check with git am that your patch
would apply cleanly. And that your mailer doesn't screw it up.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: list-modems patch

2010-10-14 Thread Alexander A Khryukin
В Чтв, 14/10/2010 в 13:13 +0300, Marcel Holtmann пишет:
 Hi Alex,
 
Sometimes i see 

[r...@alexander-desktop ofono-0.31]# /usr/lib/ofono/test/list-modems 
[ /huawei5 ]
Features = sim 
Powered = 1
Interfaces = org.ofono.Phonebook org.ofono.AudioSettings
org.ofono.VoiceCallManager org.ofono.SimManager 
Online = 0
Model = E1550
Manufacturer = huawei
Serial = 353142033084081
Revision = 11.608.12.00.143
[ org.ofono.Phonebook ]
[ org.ofono.AudioSettings ]
Traceback (most recent call last):
  File /usr/lib/ofono/test/list-modems, line 61, in module
print %s = %s % (key, val).encode('ascii')


Patch



diff --git a/test/list-modems b/test/list-modems
index 557efd5..df1dca8 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -58,6 +58,10 @@ for path, properties in modems:
) for text, icon in
properties[key] ])
else:
val = str(properties[key])
-   print %s = %s % (key, val)
+   try:
+   print %s = %s % (key, val)
+   except:
+   continue
+
   
   can you at least print the key value. Just not printing that property at
   all is bad since it is there. Just marking the value as not printable
   seems to be the better approach.
   
   Regards
   
   Marcel
   
   
   
  
  Last fully-working script
  
  [ /huawei0 ]
  
  
  del overquote
  
  ServiceNumbers = [Моб. Помощник] = '111' [MTС] =
  '+78003330890' [Служба спасения] = '112' 
  CardIdentifier = 89701012417666587513
  LockedPins = 
  PinRequired = none
  SubscriberIdentity = 250011766658751
  Present = 1
  
  
  [Моб. Помощник] - in russian means Mobile Partner
  [Служба спасения] - rescue rangers :3   
  
  
  
  
  diff --git a/test/list-modems b/test/list-modems
  index 557efd5..59765f9 100755
  --- a/test/list-modems
  +++ b/test/list-modems
  @@ -58,6 +58,10 @@ for path, properties in modems:
  ) for text, icon in
  properties[key] ])
  else:
  val = str(properties[key])
  -   print %s = %s % (key, val)
  -
  +   try:
  +   print %s = %s %
  (key.encode('utf8'), val.encode('utf8'))
  +   except:
  +   print Cannot encode some charcters
  please change locale
  +   else:
  +continue
  print
 
 patch does not apply. Please always check with git am that your patch
 would apply cleanly. And that your mailer doesn't screw it up.
 
 Regards
 
 Marcel
 
 
 

Evolution reformate message anyway
Please click on link.
Was checked and applied for me with success

http://pastie.org/pastes/1220422/text


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono